<div class="row">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <form id="my-form" class="am-form tpl-form-line-form" method="post">
                <div class="widget-body">
                    <fieldset>
                        <div class="widget-head am-cf">
                            <div class="widget-title am-fl">新增运营商</div>
                        </div>
                        <div class="am-form-group" >
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">运营商名称</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[company_name]" value="<?= $model['company_name'] ? $model['company_name'] :$model['real_name']?>"
                                       required>
                                <input type="hidden" name="agent[type]" value="<?= $model['company_name']?>">
                            </div>
                        </div>
                        <div class="am-form-group am-padding-top">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 运营商性质 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <div class="x-region-select" data-region-selected>
                                    <select name="agent[level]" data-province required>
                                        <?php if ($model['level'] ==0) : ?>
                                            <option value="0">默认</option>
                                        <?php elseif ($model['level'] ==1 ) : ?>
                                            <option value="1">个人</option>
                                        <?php else: ?>
                                            <option value="2">企业</option>
                                        <?php endif; ?>



                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="am-form-group" >
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">负责人姓名</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[real_name]" value="<?= $model['real_name']?>"
                                       required>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">联系电话</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[company_tel]" value="<?= $model['company_tel']?>"
                                       required>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">参与分红百分比</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[service_charge]" value="<?= $model['service_charge']?>"
                                       required>
                            </div>
                        </div>

                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">服务商推荐运营商获得的奖金</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[operate_reward]" value="<?= $model['operate_reward']?>"
                                       required>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">服务商推荐合伙人获得的奖金</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[partner_reward]" value="<?= $model['partner_reward']?>"
                                       required>
                            </div>
                        </div>


                    </fieldset>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $(function () {
        $('#my-form').superForm();
    });
</script>
